﻿using System;

namespace Meqs.Entity
{
    [Serializable]
    public class SchPrem
    {
        public SchPrem()
        {
        }

        public SchPrem(int teacherID, int pNo)
        {
            _teacherID = teacherID;
            _pNo = pNo;
        }

        private int _teacherID;
        private int _pNo;

        public int TeacherID
        {
            get { return _teacherID; }
            set { _teacherID = value; }
        }

        public int PNo
        {
            get { return _pNo; }
            set { _pNo = value; }
        }

        public bool Equals(SchPrem other)
        {
            if (ReferenceEquals(null, other)) return false;
            if (ReferenceEquals(this, other)) return true;
            return other._teacherID == _teacherID;
        }

        public override bool Equals(object obj)
        {
            if (ReferenceEquals(null, obj)) return false;
            if (ReferenceEquals(this, obj)) return true;
            if (obj.GetType() != typeof (EduPrem)) return false;
            return Equals((EduPrem) obj);
        }

        public override int GetHashCode()
        {
            return _teacherID;
        }
    }
}
